/*
  ==============================================================================

  This is an automatically generated file created by the Jucer!

  Creation date:  9 May 2010 7:29:09pm

  Be careful when adding custom code to these files, as only the code within
  the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  and re-saved.

  Jucer version: 1.12

  ------------------------------------------------------------------------------

  The Jucer is part of the JUCE library - "Jules' Utility Class Extensions"
  Copyright 2004-6 by Raw Material Software ltd.

  ==============================================================================
*/

//[Headers] You can add your own extra header files here...
//[/Headers]

#include "ImageSelectButton.h"


//[MiscUserDefs] You can add your own user definitions and misc code here...
//[/MiscUserDefs]

//==============================================================================
ImageSelectButton::ImageSelectButton (const String &name)
    : Slider (name),
      button (0),
      label (0)
{
    addAndMakeVisible (button = new ImageButton (T("button")));
    button->setButtonText (String::empty);

    button->setImages (false, true, true,
                       ImageCache::getFromMemory (empty_png, empty_pngSize), 0.7500f, Colour (0x0),
                       0, 0.8500f, Colour (0x0),
                       0, 1.0000f, Colour (0x0));
    addAndMakeVisible (label = new Label (T("label"),
                                          String::empty));
    label->setFont (Font (10.0000f, Font::bold));
    label->setJustificationType (Justification::centred);
    label->setEditable (false, false, false);
    label->setColour (Label::textColourId, Colours::white);
    label->setColour (TextEditor::textColourId, Colours::black);
    label->setColour (TextEditor::backgroundColourId, Colour (0x0));


    //[UserPreSize]
	Slider::setValue (-1, false);

	//getProperties().set ("componentForcesTrigger", true);
	menuLookAndFeel.setColour (PopupMenu::textColourId, Colours::grey);
	menuLookAndFeel.setColour (PopupMenu::highlightedTextColourId, Colours::white);
	menuLookAndFeel.setColour (PopupMenu::headerTextColourId, Colours::lightslategrey);

	internalMenu.setLookAndFeel (&menuLookAndFeel);
	buttonListener.addChangeListener (this);
	button->addButtonListener (&buttonListener);
    //[/UserPreSize]

    setSize (56, 68);

    //[Constructor] You can add your own custom stuff here..
    //[/Constructor]
}

ImageSelectButton::~ImageSelectButton()
{
    //[Destructor_pre]. You can add your own custom destruction code here..
    //[/Destructor_pre]

    deleteAndZero (button);
    deleteAndZero (label);

    //[Destructor]. You can add your own custom destruction code here..
    //[/Destructor]
}

//==============================================================================
void ImageSelectButton::paint (Graphics& g)
{
    //[UserPrePaint] Add your own custom painting code here..
    //[/UserPrePaint]

    //[UserPaint] Add your own custom painting code here..
    //[/UserPaint]
}

void ImageSelectButton::resized()
{
    button->setBounds (0, 0, getWidth() - 0, getHeight() - 12);
    label->setBounds (0, (0) + (getHeight() - 12), getWidth() - 0, 12);
    //[UserResized] Add your own custom resize handling here..
    //[/UserResized]
}



//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
void ImageSelectButton::addItem (Image *itemIcon, const String &itemName, const double itemValue)
{
	SelectionItem *item = new SelectionItem;
	item->icon	= itemIcon;
	item->name	= itemName;
	item->value	= itemValue;

	items.add (item);
	items.sort (*this);

	setRange (items.getFirst()->value, items.getLast()->value, 1);
	createMenu();
}

int ImageSelectButton::compareElements(SelectionItem *first, SelectionItem *second)
{
	if (first->value < second->value)
	{
		return (-1);
	}
	else if (first->value > second->value)
	{
		return (1);
	}
	else if (first->value == second->value)
	{
		return (0);
	}
	else
	{
		return (0);
	}
}

SelectionItem *ImageSelectButton::getItem (const double _value)
{
	for (int i=0; i<items.size(); i++)
	{
		if (items[i]->value == _value)
		{
			return (items[i]);
		}
	}

	return (0);
}

void ImageSelectButton::buttonValueChanged()
{
	if (getItem (getValue()))
	{
		 button->setImages (false, true, true,
                       new Image (*getItem (getValue())->icon), 0.7500f, Colour (0x0),
                       0, 0.8500f, Colour (0x0),
                       0, 1.0000f, Colour (0x0));
		 label->setText (getItem (getValue())->name, false);
	}
}

void ImageSelectButton::valueChanged()
{
	buttonValueChanged();
}

void ImageSelectButton::createMenu()
{
	internalMenu.clear();
	internalMenu.addSectionHeader (getName());

	for (int i=0; i<items.size(); i++)
	{
		internalMenu.addItem (i+1, items[i]->name, true, false, items[i]->icon);
	}
}

void ImageSelectButton::lookAndFeelChanged ()
{
}

void ImageSelectButton::changeListenerCallback (void* objectThatHasChanged)
{
	if (objectThatHasChanged == button)
	{
		if (items.getFirst())
		{
			const int ret = internalMenu.show (0,0,0, items.getFirst()->icon->getHeight());

			if (items[ret-1])
			{
				Slider::setValue (items[ret-1]->value, true);
			}
		}
	}
}

void ImageSelectButton::setButtonValue (double newValue, bool sendUpdateMessage, bool sendMessageSynchronously)
{
	Slider::setValue (newValue, sendUpdateMessage, sendMessageSynchronously);
	buttonValueChanged();
}

void ImageSelectButton::mouseWheelMove (const MouseEvent  &e, float wheelIncrementX, float wheelIncrementY)
{
	if (wheelIncrementY > 0)
	{
		SelectionItem *i = getItem (getValue());

		if (i && items.getLast() != i)
		{
			setValue (items[items.indexOf(i)+1]->value);
		}
		else if (i == NULL)
		{
			setValue (items.getFirst()->value);
		}
	}
	if (wheelIncrementY < 0)
	{
		SelectionItem *i = getItem (getValue());

		if (i && items.getFirst() != i)
		{
			setValue (items[items.indexOf(i)-1]->value);
		}
		else if (i == NULL)
		{
			setValue (items.getFirst()->value);
		}
	}
}
//[/MiscUserCode]


//==============================================================================
#if 0
/*  -- Jucer information section --

    This is where the Jucer puts all of its metadata, so don't change anything in here!

BEGIN_JUCER_METADATA

<JUCER_COMPONENT documentType="Component" className="ImageSelectButton" componentName=""
                 parentClasses="public Slider, public ChangeListener" constructorParams="const String &amp;name"
                 variableInitialisers="Slider (name)" snapPixels="8" snapActive="1"
                 snapShown="1" overlayOpacity="0.330000013" fixedSize="1" initialWidth="56"
                 initialHeight="68">
  <BACKGROUND backgroundColour="0"/>
  <IMAGEBUTTON name="button" id="40ea63beaf8c471d" memberName="button" virtualName=""
               explicitFocusOrder="0" pos="0 0 0M 12M" buttonText="" connectedEdges="0"
               needsCallback="0" radioGroupId="0" keepProportions="1" resourceNormal="empty_png"
               opacityNormal="0.75" colourNormal="0" resourceOver="" opacityOver="0.850000024"
               colourOver="0" resourceDown="" opacityDown="1" colourDown="0"/>
  <LABEL name="label" id="ab77f45ee46cb6c6" memberName="label" virtualName=""
         explicitFocusOrder="0" pos="0 0R 0M 12" posRelativeY="40ea63beaf8c471d"
         textCol="ffffffff" edTextCol="ff000000" edBkgCol="0" labelText=""
         editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
         fontname="Default font" fontsize="10" bold="1" italic="0" justification="36"/>
</JUCER_COMPONENT>

END_JUCER_METADATA
*/
#endif

//==============================================================================
// Binary resources - be careful not to edit any of these sections!

// JUCER_RESOURCE: empty_png, 4087, "../../../../../Users/atom/Desktop/empty.png"
static const unsigned char resource_ImageSelectButton_empty_png[] = { 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,56,0,0,0,56,8,6,0,0,0,168,134,59,30,0,0,10,79,105,67,67,80,80,104,111,116,111,
115,104,111,112,32,73,67,67,32,112,114,111,102,105,108,101,0,0,120,218,157,83,103,84,83,233,22,61,247,222,244,66,75,136,128,148,75,111,82,21,8,32,82,66,139,128,20,145,38,42,33,9,16,74,136,33,161,217,21,
81,193,17,69,69,4,27,200,160,136,3,142,142,128,140,21,81,44,12,138,10,216,7,228,33,162,142,131,163,136,138,202,251,225,123,163,107,214,188,247,230,205,254,181,215,62,231,172,243,157,179,207,7,192,8,12,
150,72,51,81,53,128,12,169,66,30,17,224,131,199,196,198,225,228,46,64,129,10,36,112,0,16,8,179,100,33,115,253,35,1,0,248,126,60,60,43,34,192,7,190,0,1,120,211,11,8,0,192,77,155,192,48,28,135,255,15,234,
66,153,92,1,128,132,1,192,116,145,56,75,8,128,20,0,64,122,142,66,166,0,64,70,1,128,157,152,38,83,0,160,4,0,96,203,99,98,227,0,80,45,0,96,39,127,230,211,0,128,157,248,153,123,1,0,91,148,33,21,1,160,145,
0,32,19,101,136,68,0,104,59,0,172,207,86,138,69,0,88,48,0,20,102,75,196,57,0,216,45,0,48,73,87,102,72,0,176,183,0,192,206,16,11,178,0,8,12,0,48,81,136,133,41,0,4,123,0,96,200,35,35,120,0,132,153,0,20,
70,242,87,60,241,43,174,16,231,42,0,0,120,153,178,60,185,36,57,69,129,91,8,45,113,7,87,87,46,30,40,206,73,23,43,20,54,97,2,97,154,64,46,194,121,153,25,50,129,52,15,224,243,204,0,0,160,145,21,17,224,131,
243,253,120,206,14,174,206,206,54,142,182,14,95,45,234,191,6,255,34,98,98,227,254,229,207,171,112,64,0,0,225,116,126,209,254,44,47,179,26,128,59,6,128,109,254,162,37,238,4,104,94,11,160,117,247,139,102,
178,15,64,181,0,160,233,218,87,243,112,248,126,60,60,69,161,144,185,217,217,229,228,228,216,74,196,66,91,97,202,87,125,254,103,194,95,192,87,253,108,249,126,60,252,247,245,224,190,226,36,129,50,93,129,
71,4,248,224,194,204,244,76,165,28,207,146,9,132,98,220,230,143,71,252,183,11,255,252,29,211,34,196,73,98,185,88,42,20,227,81,18,113,142,68,154,140,243,50,165,34,137,66,146,41,197,37,210,255,100,226,223,
44,251,3,62,223,53,0,176,106,62,1,123,145,45,168,93,99,3,246,75,39,16,88,116,192,226,247,0,0,242,187,111,193,212,40,8,3,128,104,131,225,207,119,255,239,63,253,71,160,37,0,128,102,73,146,113,0,0,94,68,
36,46,84,202,179,63,199,8,0,0,68,160,129,42,176,65,27,244,193,24,44,192,6,28,193,5,220,193,11,252,96,54,132,66,36,196,194,66,16,66,10,100,128,28,114,96,41,172,130,66,40,134,205,176,29,42,96,47,212,64,
29,52,192,81,104,134,147,112,14,46,194,85,184,14,61,112,15,250,97,8,158,193,40,188,129,9,4,65,200,8,19,97,33,218,136,1,98,138,88,35,142,8,23,153,133,248,33,193,72,4,18,139,36,32,201,136,20,81,34,75,145,
53,72,49,82,138,84,32,85,72,29,242,61,114,2,57,135,92,70,186,145,59,200,0,50,130,252,134,188,71,49,148,129,178,81,61,212,12,181,67,185,168,55,26,132,70,162,11,208,100,116,49,154,143,22,160,155,208,114,
180,26,61,140,54,161,231,208,171,104,15,218,143,62,67,199,48,192,232,24,7,51,196,108,48,46,198,195,66,177,56,44,9,147,99,203,177,34,172,12,171,198,26,176,86,172,3,187,137,245,99,207,177,119,4,18,129,69,
192,9,54,4,119,66,32,97,30,65,72,88,76,88,78,216,72,168,32,28,36,52,17,218,9,55,9,3,132,81,194,39,34,147,168,75,180,38,186,17,249,196,24,98,50,49,135,88,72,44,35,214,18,143,19,47,16,123,136,67,196,55,
36,18,137,67,50,39,185,144,2,73,177,164,84,210,18,210,70,210,110,82,35,233,44,169,155,52,72,26,35,147,201,218,100,107,178,7,57,148,44,32,43,200,133,228,157,228,195,228,51,228,27,228,33,242,91,10,157,98,
64,113,164,248,83,226,40,82,202,106,74,25,229,16,229,52,229,6,101,152,50,65,85,163,154,82,221,168,161,84,17,53,143,90,66,173,161,182,82,175,81,135,168,19,52,117,154,57,205,131,22,73,75,165,173,162,149,
211,26,104,23,104,247,105,175,232,116,186,17,221,149,30,78,151,208,87,210,203,233,71,232,151,232,3,244,119,12,13,134,21,131,199,136,103,40,25,155,24,7,24,103,25,119,24,175,152,76,166,25,211,139,25,199,
84,48,55,49,235,152,231,153,15,153,111,85,88,42,182,42,124,21,145,202,10,149,74,149,38,149,27,42,47,84,169,170,166,170,222,170,11,85,243,85,203,84,143,169,94,83,125,174,70,85,51,83,227,169,9,212,150,171,
85,170,157,80,235,83,27,83,103,169,59,168,135,170,103,168,111,84,63,164,126,89,253,137,6,89,195,76,195,79,67,164,81,160,177,95,227,188,198,32,11,99,25,179,120,44,33,107,13,171,134,117,129,53,196,38,177,
205,217,124,118,42,187,152,253,29,187,139,61,170,169,161,57,67,51,74,51,87,179,82,243,148,102,63,7,227,152,113,248,156,116,78,9,231,40,167,151,243,126,138,222,20,239,41,226,41,27,166,52,76,185,49,101,
92,107,170,150,151,150,88,171,72,171,81,171,71,235,189,54,174,237,167,157,166,189,69,187,89,251,129,14,65,199,74,39,92,39,71,103,143,206,5,157,231,83,217,83,221,167,10,167,22,77,61,58,245,174,46,170,107,
165,27,161,187,68,119,191,110,167,238,152,158,190,94,128,158,76,111,167,222,121,189,231,250,28,125,47,253,84,253,109,250,167,245,71,12,88,6,179,12,36,6,219,12,206,24,60,197,53,113,111,60,29,47,199,219,
241,81,67,93,195,64,67,165,97,149,97,151,225,132,145,185,209,60,163,213,70,141,70,15,140,105,198,92,227,36,227,109,198,109,198,163,38,6,38,33,38,75,77,234,77,238,154,82,77,185,166,41,166,59,76,59,76,199,
205,204,205,162,205,214,153,53,155,61,49,215,50,231,155,231,155,215,155,223,183,96,90,120,90,44,182,168,182,184,101,73,178,228,90,166,89,238,182,188,110,133,90,57,89,165,88,85,90,93,179,70,173,157,173,
37,214,187,173,187,167,17,167,185,78,147,78,171,158,214,103,195,176,241,182,201,182,169,183,25,176,229,216,6,219,174,182,109,182,125,97,103,98,23,103,183,197,174,195,238,147,189,147,125,186,125,141,253,
61,7,13,135,217,14,171,29,90,29,126,115,180,114,20,58,86,58,222,154,206,156,238,63,125,197,244,150,233,47,103,88,207,16,207,216,51,227,182,19,203,41,196,105,157,83,155,211,71,103,23,103,185,115,131,243,
136,139,137,75,130,203,46,151,62,46,155,27,198,221,200,189,228,74,116,245,113,93,225,122,210,245,157,155,179,155,194,237,168,219,175,238,54,238,105,238,135,220,159,204,52,159,41,158,89,51,115,208,195,
200,67,224,81,229,209,63,11,159,149,48,107,223,172,126,79,67,79,129,103,181,231,35,47,99,47,145,87,173,215,176,183,165,119,170,247,97,239,23,62,246,62,114,159,227,62,227,60,55,222,50,222,89,95,204,55,
192,183,200,183,203,79,195,111,158,95,133,223,67,127,35,255,100,255,122,255,209,0,167,128,37,1,103,3,137,129,65,129,91,2,251,248,122,124,33,191,142,63,58,219,101,246,178,217,237,65,140,160,185,65,21,65,
143,130,173,130,229,193,173,33,104,200,236,144,173,33,247,231,152,206,145,206,105,14,133,80,126,232,214,208,7,97,230,97,139,195,126,12,39,133,135,133,87,134,63,142,112,136,88,26,209,49,151,53,119,209,
220,67,115,223,68,250,68,150,68,222,155,103,49,79,57,175,45,74,53,42,62,170,46,106,60,218,55,186,52,186,63,198,46,102,89,204,213,88,157,88,73,108,75,28,57,46,42,174,54,110,108,190,223,252,237,243,135,
226,157,226,11,227,123,23,152,47,200,93,112,121,161,206,194,244,133,167,22,169,46,18,44,58,150,64,76,136,78,56,148,240,65,16,42,168,22,140,37,242,19,119,37,142,10,121,194,29,194,103,34,47,209,54,209,136,
216,67,92,42,30,78,242,72,42,77,122,146,236,145,188,53,121,36,197,51,165,44,229,185,132,39,169,144,188,76,13,76,221,155,58,158,22,154,118,32,109,50,61,58,189,49,131,146,145,144,113,66,170,33,77,147,182,
103,234,103,230,102,118,203,172,101,133,178,254,197,110,139,183,47,30,149,7,201,107,179,144,172,5,89,45,10,182,66,166,232,84,90,40,215,42,7,178,103,101,87,102,191,205,137,202,57,150,171,158,43,205,237,
204,179,202,219,144,55,156,239,159,255,237,18,194,18,225,146,182,165,134,75,87,45,29,88,230,189,172,106,57,178,60,113,121,219,10,227,21,5,43,134,86,6,172,60,184,138,182,42,109,213,79,171,237,87,151,174,
126,189,38,122,77,107,129,94,193,202,130,193,181,1,107,235,11,85,10,229,133,125,235,220,215,237,93,79,88,47,89,223,181,97,250,134,157,27,62,21,137,138,174,20,219,23,151,21,127,216,40,220,120,229,27,135,
111,202,191,153,220,148,180,169,171,196,185,100,207,102,210,102,233,230,222,45,158,91,14,150,170,151,230,151,14,110,13,217,218,180,13,223,86,180,237,245,246,69,219,47,151,205,40,219,187,131,182,67,185,
163,191,60,184,188,101,167,201,206,205,59,63,84,164,84,244,84,250,84,54,238,210,221,181,97,215,248,110,209,238,27,123,188,246,52,236,213,219,91,188,247,253,62,201,190,219,85,1,85,77,213,102,213,101,251,
73,251,179,247,63,174,137,170,233,248,150,251,109,93,173,78,109,113,237,199,3,210,3,253,7,35,14,182,215,185,212,213,29,210,61,84,82,143,214,43,235,71,14,199,31,190,254,157,239,119,45,13,54,13,85,141,156,
198,226,35,112,68,121,228,233,247,9,223,247,30,13,58,218,118,140,123,172,225,7,211,31,118,29,103,29,47,106,66,154,242,154,70,155,83,154,251,91,98,91,186,79,204,62,209,214,234,222,122,252,71,219,31,15,
156,52,60,89,121,74,243,84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126,46,249,220,96,219,162,182,123,231,99,206,223,106,15,111,239,186,16,116,225,210,69,255,139,231,59,188,59,206,92,
242,184,116,242,178,219,229,19,87,184,87,154,175,58,95,109,234,116,234,60,254,147,211,79,199,187,156,187,154,174,185,92,107,185,238,122,189,181,123,102,247,233,27,158,55,206,221,244,189,121,241,22,255,
214,213,158,57,61,221,189,243,122,111,247,197,247,245,223,22,221,126,114,39,253,206,203,187,217,119,39,238,173,188,79,188,95,244,64,237,65,217,67,221,135,213,63,91,254,220,216,239,220,127,106,192,119,
160,243,209,220,71,247,6,133,131,207,254,145,245,143,15,67,5,143,153,143,203,134,13,134,235,158,56,62,57,57,226,63,114,253,233,252,167,67,207,100,207,38,158,23,254,162,254,203,174,23,22,47,126,248,213,
235,215,206,209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235,25,175,219,198,194,198,30,190,201,120,51,49,94,244,86,251,237,193,119,220,119,29,239,163,223,15,79,228,124,32,127,40,255,104,
249,177,245,83,208,167,251,147,25,147,147,255,4,3,152,243,252,99,51,45,219,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,46,35,0,0,46,35,1,120,165,63,118,0,0,0,7,116,
73,77,69,7,218,5,8,21,31,47,14,67,96,42,0,0,5,41,73,68,65,84,104,222,237,154,189,111,20,71,24,198,159,119,230,230,246,28,95,130,65,8,12,105,72,17,164,184,74,7,82,136,144,82,68,41,8,82,58,26,164,20,52,
244,254,15,72,69,220,80,209,80,164,164,73,131,64,138,162,40,20,33,133,139,68,73,21,137,72,40,69,72,206,62,227,117,108,239,121,247,230,227,77,225,153,211,178,220,199,222,217,220,45,146,95,105,164,251,220,
157,223,61,239,215,204,28,112,100,71,118,100,71,86,5,187,115,231,206,27,57,23,26,245,129,27,55,110,224,222,189,123,0,128,7,15,30,124,172,181,254,114,119,119,247,146,181,246,221,105,66,73,41,159,55,155,
205,39,74,169,111,174,94,189,250,83,113,110,19,3,2,16,43,43,43,239,31,63,126,252,235,86,171,245,249,198,198,6,172,181,225,61,46,121,141,131,88,239,30,82,74,156,60,121,18,139,139,139,15,227,56,94,94,94,
94,254,19,128,27,250,195,12,122,99,105,105,9,237,118,91,220,186,117,235,35,33,196,183,207,158,61,187,16,199,49,152,57,15,69,83,16,175,119,15,107,45,111,111,111,211,230,230,230,249,249,249,249,43,151,47,
95,254,229,241,227,199,127,47,45,45,113,187,221,30,91,65,113,243,230,205,15,78,159,62,253,112,125,125,253,156,181,150,133,16,4,0,68,52,147,216,219,255,109,1,231,28,75,41,233,212,169,83,127,173,173,173,
93,185,123,247,238,31,131,148,172,245,123,81,41,69,90,235,218,177,99,199,110,183,90,173,115,198,24,22,66,144,181,118,102,112,5,72,234,118,187,220,106,181,206,45,44,44,220,6,240,133,82,74,107,173,185,172,
130,116,237,218,181,79,23,22,22,190,75,211,20,66,8,204,82,185,33,74,162,209,104,96,107,107,235,179,251,247,239,127,239,227,117,180,130,0,132,148,242,122,146,36,0,192,206,57,170,10,92,30,146,153,57,73,
18,146,82,94,7,240,3,0,91,6,144,0,212,179,44,187,168,148,2,237,27,42,10,72,204,12,173,245,69,0,117,0,105,81,197,126,128,2,64,100,173,93,12,96,21,6,4,51,195,24,179,232,1,187,69,21,7,1,214,180,214,4,128,
137,136,170,28,131,204,204,198,24,2,160,252,220,109,153,24,148,198,24,4,184,42,100,207,33,144,100,140,25,88,211,7,197,32,60,32,132,16,149,118,81,231,28,60,96,223,170,48,72,65,50,198,64,8,1,231,28,42,238,
162,1,144,74,23,122,223,22,189,162,98,213,20,12,128,185,222,184,60,96,30,206,57,87,41,55,205,103,208,130,139,78,6,88,101,5,39,6,12,95,148,82,86,90,65,107,45,156,115,227,3,102,89,134,70,163,177,95,24,43,
170,96,0,204,178,108,124,192,23,47,94,96,126,126,30,115,115,115,136,162,8,82,202,74,1,26,99,144,101,25,246,246,246,208,233,116,198,7,76,211,20,198,24,164,105,138,122,189,142,122,189,142,40,138,224,251,
211,94,170,158,150,17,17,156,115,208,90,35,203,50,116,187,221,222,152,40,6,131,91,58,231,122,23,73,211,20,68,4,41,37,148,82,168,213,106,144,82,246,234,228,97,65,135,112,8,121,32,12,107,237,75,201,133,
153,123,137,112,108,192,60,100,24,133,6,247,165,207,73,41,123,176,249,239,13,187,121,190,88,23,179,98,120,220,175,192,231,231,20,90,201,177,1,139,43,137,97,89,212,47,89,160,181,30,170,200,160,142,100,
216,253,251,93,39,40,87,102,165,115,40,128,147,182,113,7,201,204,7,6,204,95,164,138,13,183,16,162,167,228,48,43,173,224,168,88,154,69,70,61,176,139,22,65,171,100,249,57,77,12,88,204,162,85,4,28,213,101,
213,14,35,144,103,9,120,104,49,88,181,102,251,80,202,68,63,87,173,82,22,13,141,192,129,92,180,202,113,88,102,149,51,178,23,125,19,202,196,196,189,104,177,84,84,45,201,148,233,134,134,197,32,17,17,87,117,
235,62,231,93,60,236,224,164,31,32,239,39,42,182,249,173,184,252,138,98,214,96,133,57,144,159,43,99,140,211,37,48,115,27,64,179,232,6,179,142,197,252,146,41,247,218,198,184,10,58,173,245,239,81,20,189,
231,159,83,69,51,41,59,231,72,107,253,27,246,79,120,95,81,176,159,28,14,128,75,146,228,145,49,6,204,76,97,81,58,170,9,120,221,163,184,101,200,204,100,140,65,146,36,143,194,188,203,2,118,147,36,89,205,
178,108,213,175,174,57,108,207,229,87,245,179,216,38,116,206,133,173,66,246,27,79,171,73,146,172,98,255,232,236,21,192,97,91,101,202,24,179,166,148,186,164,148,106,194,31,165,149,93,145,31,118,204,21,
0,217,90,75,157,78,103,61,142,227,175,172,181,79,1,252,135,62,39,188,131,0,25,128,179,214,238,89,107,215,132,16,31,74,41,155,62,131,177,207,92,152,198,8,94,147,7,211,90,83,146,36,235,91,91,91,183,211,
52,253,25,192,26,250,156,238,142,2,52,0,140,214,122,51,203,178,167,0,206,18,209,153,160,98,56,35,119,206,209,107,134,99,231,28,121,183,164,52,77,177,179,179,243,107,28,199,43,105,154,62,1,240,28,192,14,
6,252,141,100,84,74,84,0,222,1,112,22,192,153,40,138,46,52,155,205,79,234,245,250,249,90,173,118,98,90,255,76,96,102,103,140,137,187,221,238,211,221,221,221,31,179,44,91,5,240,47,128,127,0,108,3,208,3,
235,102,137,235,215,0,188,5,224,132,31,111,3,152,243,240,211,170,25,236,33,246,188,90,155,126,116,188,167,225,32,128,225,115,202,131,205,1,104,228,0,167,241,95,181,0,152,122,200,61,255,156,203,76,124,
172,78,201,151,22,26,145,129,95,135,133,118,204,149,1,59,178,35,123,67,236,127,179,106,231,128,190,130,88,157,0,0,0,0,73,69,78,68,174,66,96,130,0,0};

const char* ImageSelectButton::empty_png = (const char*) resource_ImageSelectButton_empty_png;
const int ImageSelectButton::empty_pngSize = 4087;
